package com.khyr.controller;

import com.khyr.Vo.*;
import com.khyr.entity.ChargeItem;
import com.khyr.service.DrugStatisticsService;
import com.khyr.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author ：Zhang
 * @date ：Created in 2025/3/11 17:23
 * @description：药品统计
 * @modified By：
 * @version: 1.0
 */
@RestController
@RequestMapping("/accountant/DrugStatistics")
public class DrugStatisticsController {
    @Autowired
    private DrugStatisticsService drugStatisticsService;
    @PostMapping("/select")
    public R<List<DrugSalesListVo>> select(@RequestBody NameAndDateVo data){
        return drugStatisticsService.select(data);
    }
    @PostMapping("/statisticalListOfDrugSales")
    public R<List<StatisticalListOfDrugSalesVo>> selectDrug(@RequestBody NameAndDateVo data){
        return drugStatisticsService.selectDrug(data);
    }
    @GetMapping("/selectAllByCoId")
    public R<List<ChargeItem>> selectAllByCoId(@RequestParam String coId){
        return drugStatisticsService.selectAllByCoId(coId);
    }
}


